package com.jimmy.medical.entity;

import lombok.Data;
import org.hibernate.annotations.NotFound;
import org.hibernate.annotations.NotFoundAction;

import javax.persistence.*;

/**
 * 订单需要携带资料
 * 
 * @author jimmy
 * @since 0.1
 */
@Data
@Entity
@Table(name = "order_need_file")
public class OrderFile extends AbstractEntity {
	/** 订单*/
	@ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "order_id")
    @NotFound(action = NotFoundAction.IGNORE)
    private Order order;
	
	/** 资料*/
	@ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "need_file_id")
    @NotFound(action = NotFoundAction.IGNORE)
	private UploadFile file;
}
